package beans;

import entities.NotasCreditoCabecera;
import controllers.NotasCreditoCabeceraFacade;
import java.io.Serializable;
import javax.annotation.PostConstruct;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

@ManagedBean(name = "notasCreditoCabeceraController")
@ViewScoped
public class NotasCreditoCabeceraController extends AbstractController<NotasCreditoCabecera> implements Serializable {

    @EJB
    private NotasCreditoCabeceraFacade ejbFacade;

    public NotasCreditoCabeceraController() {
        super(NotasCreditoCabecera.class);
    }

    @PostConstruct
    public void init() {
        super.setFacade(ejbFacade);
    }

    @Override
    protected void initializeEmbeddableKey() {
        this.getSelected().setNotasCreditoCabeceraPK(new entities.NotasCreditoCabeceraPK());
    }
}
